 namespace detail {
        template<typename Sender, typename Function, typename MessageType = typename Sender::value_type>
        class sink_impl {
            public:
                sink_impl(Sender&& sender, Function function):m_sender(std::move(sender)),m_function(function)
                {
                    // 宿一旦创建就连接到分配给它的发送者
                    m_sender.set_message_handler(
                        [this](MessageType&& message)
                        {
                            process_message(std::move(message));
                        }
                    );
                }
        

        void process_message(MessageType&& messageType) const
        {
            // 只要得到一条消息，就把它传递给用户定义的函数
            std::invoke(m_function, std::move(message));
        }
        private:
            Sender m_sender;
            Function m_function;

    };

    template <typename Function>
        struct sink_helper {
            Function function;
    };
 }